package com.per.mybootall.test;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: yyy
 * Date: 2021/12/27
 * Time: 16:49
 * Description:
 */
public class test07 {
    public static void main(String[] args) {
        Map<Object,Object> map=new HashMap(){{
            put("data",new Date());
            put("list",new HashMap(){{
                put("user1","信息1");
                put("user2","信息2");
                put("user3","信息3");
            }} );
        }};


        for (Map.Entry<Object, Object> entry : map.entrySet()) {
            System.out.println("key = " + entry.getKey() + ", value = " + entry.getValue());
        }

        Map smallMap=(Map) map.get("list");
        smallMap.remove("user1");
        System.out.println("--------------------------------------");

        for (Map.Entry<Object, Object> entry : map.entrySet()) {
            System.out.println("key = " + entry.getKey() + ", value = " + entry.getValue());
        }
    }


}
